#include<iostream>
using namespace std;
const double PI=3.1415926;
class Shape
{
public:
	Shape(){cout<<"Constructing Shape..."<<endl;}
	virtual ~Shape(){cout<<"Destructing Shape..."<<endl;}
	virtual void Name(){cout<<"Share"<<endl;}
	virtual double Area()=0;
	virtual double C()=0;
};
class Point: public Shape
{
public:
	Point(){cout<<"Constructing Point..."<<endl;}
	~Point(){cout<<"Destructing Point..."<<endl;}
	virtual void Name(){cout<<"Point"<<endl;}
	double Area(){return 0;}
	double C(){return 0;}
};
class Circle: public virtual Point
{
public:
	Circle(double r):radious(r){cout<<"Constructing Circle..."<<endl;}
	~Circle(){cout<<"Destructing Circle..."<<endl;}
	void Name(){cout<<"Circle"<<endl;}
	double Area(){return PI*radious*radious;}
	double C(){return 2*PI*radious;}
private:
	double radious;
};
int main()
{
	Shape *p;
	p=new Point;
	p->Name();
	cout<<"C:"<<p->C()<<endl;
	cout<<"Area:"<<p->Area()<<endl;
	delete p;
	cout<<endl;
	p=new Circle(5);
	p->Name();
	cout<<"C:"<<p->C()<<endl;
	cout<<"Area:"<<p->Area()<<endl;
	delete p;
	return 0;
}

